HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/orbi-individual/components/UI/servicesCard.js
import React from 'react';

export default function ServicesCard({ data }) {
   
    const [isExpanded, setIsExpanded] = React.useState(false);

    const handleReadMore = () => {
        setIsExpanded(!isExpanded);
    };

    return (
        <div className="item">
            <img src={data.service.media[0].original_url} alt="services" />
            <div className="item-text">
                <h5>{data.service.name}</h5>
                <p>
                    {isExpanded
                        ? data.service.description
                        : `${data.service.description.substring(0,100)}...`}
                </p>
                <div className="team-button">
                    <a  onClick={handleReadMore} className="btn btn-sm style-skew">
                        <span>{isExpanded ? 'Show Less' : 'Read More..'}</span>
                    </a>
                </div>
            </div>
        </div>
    );
}